﻿namespace WeatherWeb
{
    using WeaterService;

    public class WeatherService : IWeatherInfoService
    {
        public WeatherInfo GetWeatherByLocation(string location)
        {
            GpsCoordinates coordinates = GetGpsCoordinatesFromLocation(location);
            return this.GetWeatherByCoordinates(coordinates);
        }

        public GpsCoordinates GetGpsCoordinatesFromLocation(string location)
        {
            return new GpsCoordinates() { Latitude = "42.345678", Longtitude = "23.3434343" };
        }

        public WeatherInfo GetWeatherByCoordinates(GpsCoordinates coordinates)
        {
            return new WeatherInfo()
            {
                TemperatureC = 2,
                TemeperatureFeelC = -2,
            };
        }

        public decimal GetTemperature(string location)
        {
            return 2.2M;
        }
    }
}
